<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/common/taglibs.jsp"%>
<html>
<head>
	<base target="_self">
	<%@include file="/common/meta.jsp"%>
	<%@include file="/common/ec.jsp"%>
</head>
<body>
<div class="x-toolbar" style="height: 25px;  padding:3px 5px;">
  <form action="selectProject.do" method="post">
	<span style="color: green; font-weight: bold;">项目名称：</span>&nbsp;
	<s:textfield name="model.name" size="20"/>
	&nbsp;&nbsp;&nbsp;&nbsp;
	<input type="submit" value="查询" class="button">
  </form>
</div>
<%@ include file="/common/messages.jsp"%>
<ec:table items="items" var="item" retrieveRowsCallback="limit" sortRowsCallback="limit" 
	action="selectProject.do" 
	useAjax="false"
	doPreload="false" 
	pageSizeList="10" 
	editable="false"
	sortable="false" 
	rowsDisplayed="10" 
	generateScript="true"
	resizeColWidth="false" 
	classic="false" 
	width="552" 
	height="275px"
	minHeight="275"
	showHeader="true"
	toolbarContent="navigation|pagejump|pagesize|refresh|extend|status">
	<ec:row onclick="selectProject('${item.id}', '${item.name}')">
		<ec:column width="30" property="_no." title="No." value="${GLOBALROWCOUNT}" style="text-align:center;" />
		<ec:column width="195" property="name" title="项目名称" ellipsis="true"/>
		<ec:column width="100" property="projectType.name" title="项目类别"/>
		<ec:column width="160" property="_date" title="周期">
		  <s:date name="#attr.item.startTime" format="yyyy/MM/dd"/>-<s:date name="#attr.item.endTime" format="yyyy/MM/dd"/> 
		</ec:column>
	</ec:row>
</ec:table>
<script type="text/javascript">
	
	function selectProject(pid, pname) {
		var project = new Object();
		project.id = pid;
		project.name = pname;
		window.returnValue = project;
		window.close();
	}
</script>
</body>
</html>